#include <iostream>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char** argv) {
cout << "short 类型占用的内存大小：" << sizeof(short) << endl;

	int num = 10;
	cout << "int 类型占用的内存大小：" << sizeof(int) << endl;
	cout << "int 类型占用的内存大小：" << sizeof(num) << endl;

	cout << "long 类型占用的内存大小：" << sizeof(long) << endl;
	cout << "long long 类型占用的内存大小：" << sizeof(long long) << endl;
    float f1 = 3.1415926535f;
	cout << "float 类型占用的内存大小：" << sizeof(float) << endl;
	cout << "float 类型占用的内存大小：" << sizeof(f1) << endl;

	double d1 = 3.1415926535;
	cout << "double 类型占用的内存大小：" << sizeof(double) << endl;
	cout << "double 类型占用的内存大小：" << sizeof(d1) << endl;
//字符型变量创建方式
	char ch = 'a';
	cout << ch << endl;

	//字符型变量所占内存大小
	cout << "char字符型变量占用的内存大小：" << sizeof(char) << endl;
	cout << "char字符型变量占用的内存大小：" << sizeof(ch) << endl;

	return 0;
}